<template>
  <view>
    <my-userinfo v-if="token"></my-userinfo>
    <my-login v-else></my-login>
  </view>
</template>

<script>
  import { useUserStore } from '../../store/user';
  import { useCartStore } from '../../store/store';
  const cartStore = useCartStore()
  const userStore = useUserStore()
  export default {
    data() {
      return {
        token: userStore.token
      };
    },
    onReady(){
      this.token = userStore.token
      console.log(this.token);
      cartStore.setBage()
    }
  }
</script>

<style lang="scss">

</style>
